<script setup lang="ts">
import BranchNode from "./base/BranchNode.vue";
import nodeMixin from "../NodeMixin";
import type { FlowModelNode } from "../ProcessDef";

const props = defineProps({
  ...nodeMixin.props,
  moveLn: Boolean,
  moveRn: Boolean
});
const emit = defineEmits(["insertNode", "delete", "select", "moveL", "moveR"]);
const _value: any = defineModel<FlowModelNode>();

function validate() {}

defineExpose({ validate });
</script>

<template>
  <BranchNode
    v-model="_value"
    :readonly="props.readonly"
    :index="index"
    desc="并行执行"
    color="#718dff"
    header-icon="Operation"
    content="并行流程分支"
    :moveRn="props.moveRn"
    :moveLn="props.moveLn"
    :flow-inst-id="props.flowInstId"
    :flowHistory="flowHistory"
    :only-job="true"
    @insertNode="type => emit('insertNode', type)"
    @move-l="emit('moveL')"
    @move-r="emit('moveR')"
    @delete="emit('delete')"
    @select="emit('select', { node: _value.value })"
  />
</template>

<style scoped></style>
